﻿namespace Community.CsharpSqlite.Entity
{
    /*
     ** An instance of the following structure holds information about a
     ** single index record that has already been parsed out into individual
     ** values.
     **
     ** A record is an object that contains one or more fields of data.
     ** Records are used to store the content of a table row and to store
     ** the key of an index.  A blob encoding of a record is created by
     ** the OPCode.OP_MakeRecord opcode of the VDBE and is disassembled by the
     ** OPCode.OP_Column opcode.
     **
     ** This structure holds a record that has already been disassembled
     ** into its constituent fields.
     */

    public class UnpackedRecord
    {
        public Mem[] aMem; /* Values */
        public ushort flags; /* Boolean settings.  UNPACKED_... below */
        public ushort nField; /* Number of entries in apMem[] */
        public KeyInfo pKeyInfo; /* Collation and sort-order information */
        public long rowid; /* Used by UnpackedRecordFlag.UNPACKED_PREFIX_SEARCH */
    };
}